<?php defined('InShopNC') or exit('Access Invalid!');?>

<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/brand.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<?php echo SHOP_RESOURCE_SITE_URL;?>/js/gold_index.js" charset="utf-8"></script>
<style>
  .full-screen-slides-pagination {z-index: 11;top:750px !important;}
</style>
<div class="theme-background">
  <?php echo $output['web_html']['brand_pic'];?>
</div>
<?php $show_type = (empty($_GET['brand_show'])||$_GET['brand_show']=="list") ?"list":"icon";?>
<style>
 <?php if($show_type=="list"){?>
  .brand-zone{position: absolute; top: -360px; left: 50%;margin-left:-600px;  width: 1200px; height: 1582px;  background:#fff;z-index: 2;}
  .brand-street{ width: 100%; height: 1482px; position:relative; }
 .brand-street ul{ margin: 0 auto; height: 1450px; width:1136px; list-style-type:none; padding:0; text-align:center; }
 .brand-street ul li{ float:left; margin: 0 5px 10px 0;  width: 373px; height: 205px; border: 1px  solid  rgb(238, 238, 238); }
 <?php }else{?>
  .brand-zone{position: absolute; top: -360px; left: 20%;  width: 1200px; height: 932px;  background:#fff;z-index: 2;}
  .brand-street{ width: 100%; height: 982px; position:relative; }
  .brand-street ul{ margin: 0 auto; height: 1150px; width:1146px; list-style-type:none; padding:0; text-align:center; }
  .brand-street ul li{ float:left;  margin: 0 10px 10px 0;  width: 276px;  height: 176px;border: 1px  solid  rgb(238, 238, 238); }
  <?php }?>
</style>
<div class="brand-street">
  <div class="brand-zone">
    <div class="title" >
      <div class="name">品牌区</div>
      <?php $brand_key = empty($_GET['key']) ? 1:(int)$_GET['key'];?>
      <?php $brand_sort = empty($_GET['sort']) ? 1:(int)$_GET['sort'];?>

      <?php $current_page = empty($_GET['curpage']) ? 0:(int)$_GET['curpage']; if($current_page==1)$current_page = 0; ?>
      <div class="sort"><div class="sort-font <?php if(empty($_GET['key'])||(!empty($_GET['key']) && $_GET['key']==1))echo "current";?>"><a href="<?php $order = $_GET['order']==1?2:1; echo urlShop('brand','index',array('key'=>1,'order'=> $order,'brand_show'=>$show_type));?>">人气排序</a></div>
      <?php if(empty($_GET['key'])||(!empty($_GET['key']) && $_GET['key']==1)){?>
          <?php if(empty($_GET['order'])||(!empty($_GET['order']) && $_GET['order']==2)){?>
        <div class="sort-desc"></div>
         <?php }else{ ?>
        <div class="sort-asc"></div>
      <?php }}?>
      </div>
      <div class="sort"><div class="sort-font <?php if((!empty($_GET['key']) && $_GET['key']==2))echo "current";?>"><a href="<?php $order = $_GET['order']==1?2:1; echo urlShop('brand','index',array('key'=>2,'order'=> $order,'brand_show'=>$show_type));?>">默认排序</a></div>
        <?php if((!empty($_GET['key']) && $_GET['key']==2)){?>
          <?php if(empty($_GET['order'])||(!empty($_GET['order']) && $_GET['order']==2)){?>
            <div class="sort-desc"></div>
          <?php }else{ ?>
            <div class="sort-asc"></div>
          <?php }}?>
      </div>
      <div class="menu">
        <div><a href="<?php echo urlShop('brand','index',array('key'=>$brand_key,'order'=> $brand_sort,'brand_show'=>'list','curpage'=>$current_page));?>" ><img src="<?php echo SHOP_TEMPLATES_URL;?>/images/<?php echo $show_type=="icon" ? "0":"";?>8.jpg"/></a></div>
        <div><a href="<?php echo urlShop('brand','index',array('key'=>$brand_key,'order'=> $brand_sort,'brand_show'=>'icon','curpage'=>$current_page));?>" ><img src="<?php echo SHOP_TEMPLATES_URL;?>/images/<?php echo $show_type=="icon" ? "0":"";?>5.jpg"/></a></div>
      </div>
        <div class="filter"><?php foreach($output['brand_class'] as $class_key => $class){?>
                <div <?php if(!empty($_GET['class_id']) && $_GET['class_id']==$class_key)echo "class=\"current\"";?>><?php
                    $param = array('key'=>$brand_key,'order'=> $brand_sort,'brand_show'=>'list','class_id'=>$class_key);
                    echo "<a href=\"". urlShop('brand','index',$param)."\">".$class."</a>";?></div>
        <?php }?>
        </div>
    </div>
    <ul id="brand_list" <?php if($show_type=="icon"){?>style="display:none;"<?php }?>>
    <?php foreach($output['brand_c'] as $key => $brand){
       if(empty($brand['brand_pic1']))continue;
      ?>
      <li>
        <div class="shop brand<?php echo $key;?>">
          <a href="<?php echo urlShop('brand', 'list', array('brand'=>$brand['brand_id']));?>">
          <div class="ads-pic"><img src="<?php echo UPLOAD_SITE_URL . "/" . ATTACH_BRAND .DS;?><?php echo $brand['brand_pic1'];?>" width="100%" height="100%">
            <div class="shop-brand"><div><img src="<?php echo UPLOAD_SITE_URL . "/" . ATTACH_BRAND .DS;?><?php echo $brand['brand_pic'];?>" width="100%" height="100%" ></div></div>
          </div>
          <div class="shopName"><?php echo $brand['brand_name'];?>—品牌特卖旗舰店</div>
          </a>
      </li>
    <?php }?>
    </ul>

    <ul id="brand_icon" <?php if($show_type=="list"){?>style="display:none;"<?php }?>>
      <?php foreach($output['brand_c'] as $brand){
        if(empty($brand['brand_pic1']))continue;
        ?>
        <li>
          <div class="icon brand<?php echo $brand['class_id'];?>">
            <a href="<?php echo urlShop('brand', 'list', array('brand'=>$brand['brand_id']));?>">
              <div class="icon-pic"><img src="<?php echo UPLOAD_SITE_URL . "/" . ATTACH_BRAND .DS;?><?php echo $brand['brand_pic2'];?>" width="100%" height="100%" alt="<?php echo $brand['brand_name'];?>—品牌特卖旗舰店" title="<?php echo $brand['brand_name'];?>—品牌特卖旗舰店">
              </div>

            </a>
        </li>
      <?php }?>
    </ul>
  </div>
</div>
<div class="pagination"> <?php echo $output['show_page']; ?> </div>